Skip to content

rust(feat): calculated channel MCP tools - #736

Merged
evan-sift merged 7 commits into
mainfrom
rust/mcp-calculated-channels
Aug 27, 2026
Merged

rust(feat): calculated channel MCP tools#736
evan-sift merged 7 commits into
mainfrom
rust/mcp-calculated-channels

Conversation

@evan-sift

@evan-sift evan-sift commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Description

Adds a calculated_channels domain to the MCP server.

Tool surface: list_calculated_channels, list_calculated_channel_versions, create_calculated_channel, update_calculated_channel, archive_calculated_channel, unarchive_calculated_channel. Both list tools carry the crate's fields projection and report count / has_more.

Nested channel references ride in expression_channel_references_json, a documented JSON string parameter, keeping every other parameter flat. Update pre-reads the channel before writing: the update mask paths cover whole configuration messages, so a mask-only write would clear sibling fields the caller never mentioned.

Surface note: there is no dedicated archive RPC. Archive and unarchive go through the update mask on is_archived, matching the Python client, so the server owns the archive timestamp. They are exposed as separate tools so each can carry a destructive write gate, and the reported outcome is derived from the state the server returns rather than asserted.

Stack note: the bundled agent skill and the 0.5.0 changelog for this whole stack land at the tip (#763).

Verification

  • cargo test -p sift_mcp on this branch: 332 passed, 0 failed (pagination, limit clamp, mask construction, archive/unarchive mask shape, state-mismatch reporting, write gates, JSON parameter validation, fields projection and count).
  • cargo build -p sift_mcp --no-default-features, cargo fmt --all -- --check, cargo clippy -p sift_mcp --all-targets: clean.
  • MCP protocol check against a development org (2026-08-18, before the archive-mask rework): all six tools registered, live list_calculated_channels round trip, and all four write tools reject with the remediation message when the server runs without --allow-create / --allow-destructive. The archive mechanism was since aligned with the Python client; its request shape is pinned by tests.
  • Agent tool-selection gates (list, versions, create-blocked, create, archive) pass against the full stack binary.

@evan-sift evan-sift changed the title rust/mcp calculated channels rust(feat): calculated channel MCP tools Aug 19, 2026
@evan-sift
evan-sift force-pushed the rust/mcp-calculated-channels branch from 707b4f1 to 6881374 Compare August 26, 2026 07:55
@evan-sift
evan-sift marked this pull request as ready for review August 26, 2026 08:21
@evan-sift
evan-sift requested a review from lineville August 26, 2026 08:21
Comment thread rust/crates/sift_mcp/src/tool/calculated_channels/mod.rs
Comment thread rust/crates/sift_mcp/src/tool/calculated_channels/mod.rs Outdated

@lineville lineville left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple small inconsistencies with the backend but other than that looks good!

@evan-sift
evan-sift force-pushed the rust/mcp-calculated-channels branch from b26c94e to 0bbb0e9 Compare August 27, 2026 04:40
@evan-sift
evan-sift requested a review from lineville August 27, 2026 04:41
@evan-sift
evan-sift merged commit cb3c414 into main Aug 27, 2026
22 checks passed
@evan-sift
evan-sift deleted the rust/mcp-calculated-channels branch August 27, 2026 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants